package com.dd.cloud.user.config;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.dd.cloud.user.DTO.tencent.ImCallbackSinParamReq;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 智尔康接口配置
 * @author vodbook
 *
 */
@ConfigurationProperties(prefix = "zerk")
@Configuration
@Data
public class ZerkProperties {
	//获取科室
	private String keShiUrl;
	//获取疾病
	private String jibingUrl;
	//获取子疾病
	private String subJiBingUrl;
	//获取症状
	private String symptomsUrl;
	//获取专家信息
	private String zhuangJiaInfoUrl;
	//获取科研信息
	private String workKeYanAutorInfoUrl;
	//在线诊断
	private String askDoctorsUrl;
	//秘钥
	private String zerkSecretKey;
	//医生图片地址
	private String doctorImgUrl;

	public static void main(String[] args) {
		String str = "{\"CloudCustomData\":\"47\",\"MsgBody\":[{\"MsgType\":\"TIMCustomElem\",\"MsgContent\":{\"Desc\":\"自定义消息\",\"Data\":\"{\\\"type\\\":\\\"server_7\\\",\\\"content\\\":\\\"已问诊已开始本次问诊可持续 24 小时\\\"}\",\"Ext\":\"\",\"Sound\":\"\"}}],\"CallbackCommand\":\"C2C.CallbackAfterSendMsg\",\"From_Account\":\"411_1\",\"To_Account\":\"2_6\",\"MsgRandom\":2370260506,\"MsgSeq\":2370260506,\"MsgTime\":1690858314,\"SupportMessageExtension\":0,\"MsgKey\":\"2370260506_2370260506_1690858314\",\"OnlineOnlyFlag\":0,\"SendMsgResult\":0,\"ErrorInfo\":\"send msg succeed\",\"UnreadMsgNum\":11}";
		JSONObject jsonObject = JSONObject.parseObject(str);
		//单发消息
		ImCallbackSinParamReq sinParamReq = JSON.parseObject(JSON.toJSONString(jsonObject), ImCallbackSinParamReq.class);
		System.out.println(sinParamReq);
	}
}
